#include<iostream>
using namespace std;
#include<cmath>

#include"library.h"

int main(){

	double a=0, b=1, y, exact = M_E - 1;
	int n=10;
	double *x = new double [n];
	double *w = new double [n];
	GauLeg(a, b, n, x, w);
	y = GauLegInt(a, b, exp, n);
	cout<<"numerical integral = "<<y<<"\t error="<< y-exact <<endl;
	return 0;
}
